<template>
	<view class="invitation">
		<!-- #ifndef H5 -->
		<topTitle :styles="{back:true,title:'我的邀请',color:'#fff',bgColor:'#19B568'}" />
		<!-- #endif -->
		<view class="image">
			<image src="/static/images/my/invitation.jpg" mode=""></image>
		</view>
		<view class="invitation_button" @click.stop="invitation">
			<image src="/static/images/my/invitation.png" mode=""></image>
		</view>
		<view class="profit guide">
			<view class="title">
				如何赚钱
			</view>
			<view class="image_container">
				<view class="image">
					<image src="/static/images/my/invitation_1.png" mode=""></image>
					<view class="remark">
						<view>分享</view>
						<text>邀请好友</text>
					</view>
				</view>
				<view class="icons">
					<image src="/static/images/my/icon.png" mode=""></image>
				</view>
				<view class="image">
					<image src="/static/images/my/envelopes.png" mode=""></image>
					<view class="remark">
						<view>新人下单</view>
						<text>最高赚20元</text>
					</view>
				</view>
				<view class="icons">
					<image src="/static/images/my/icon.png" mode=""></image>
				</view>
				<view class="image">
					<image src="/static/images/my/wallet.png" mode=""></image>
					<view class="remark">
						<view>第二单</view>
						<text>最高赚10元</text>
					</view>
				</view>
			</view>
		</view>
		<view class="profit">
			<view class="title">
				我的收益
			</view>
			<view class="invitation_info">
				<view class="container">
					<view class="count">
						<text>0</text>元
					</view>
					<view class="image">
						<image src="/static/images/my/accumulate.png" mode=""></image>
					</view>
				</view>
				<view class="container">
					<view class="count">
						<text>0</text>人
					</view>
					<view class="image">
						<image src="/static/images/my/friends.png" mode=""></image>
					</view>
				</view>
			</view>
			<view class="invitation_record">
				<text class="tips">邀请记录</text>
				<view class="record_list">
					<view class="record_item" v-for="(item,index) in recordList" :key="index">
						<view class="name">
							{{item.name}}
						</view>
						<view class="time">
							{{item.time}}
						</view>
					</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import topTitle from "@/components/topTitle.vue"
	export default {
		components:{
			topTitle
		},
		data() {
			return {
				recordList:[
					{
						name:'张**',
						time:'2022-10-28'
					},
					{
						name:'李**',
						time:'2022-10-28'
					},
					{
						name:'王**',
						time:'2022-10-28'
					},
				]
			};
		},
		onLoad() {
			
		},
		methods:{
			//分享
			invitation(){
				uni.navigateTo({
					url:'/pages/my/invitation/share'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	page{
		width: 100%;
		height: 100%;
	}
	.invitation{
		width: 100%;
		height: 100%;
		background-color: #19B568;
		overflow-y: auto;
		.image{
			width: 100%;
			height: 300px;
			>image{
				width: 100%;
				height: 100%;
			}
		}
		.invitation_button{
			display: flex;
			align-items: center;
			justify-content: center;
			>image{
				width: 154px;
				height: 54px;
			}
		}
		.profit{
			margin:40px 31px;
			height: 450px;
			padding: 24px 22px;
			box-sizing: border-box;
			background-color: #019950;
			border-radius: 18px;
			.title{
				width: 164px;
				height: 31px;
				line-height: 31px;
				font-size: 19px;
				font-weight: 700;
				color: #018443;
				background: url('@/static/images/my/title.png') no-repeat;
				background-size: 100%;
				padding-left: 30px;
				box-sizing: border-box;
				margin: 0 auto;
			}
			.invitation_info{
				margin-top: 32px;
				display: flex;
				align-items: center;
				justify-content: space-between;
				>.container{
					width: 155px;
					height: 94px;
					border-radius: 14px;
					text-align: center;
					color: #fff;
					padding: 10px 20px;
					box-sizing: border-box;
					background-color: #006031;
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: space-between;
					.image{
						width: 114px;
						height: 29px;
						>image{
							width: 100%;
							height: 100%;
						}
					}
					.count{
						margin-top: 10px;
						font-size: 16px;
						font-weight: 700;
						font-family: "Source Han Sans CN";
						>text{
							font-size: 28px;
							margin-right: 5px;
						}
					}
				}
			}
			.invitation_record{
				height: 225px;
				background-color: #006031;
				padding: 21px;
				box-sizing: border-box;
				margin-top: 15px;
				border-radius: 14px;
				.tips{
					color: #fff;
					font-size: 16px;
					font-weight: 700;
				}
				.record_list{
					width: 100%;
					display: flex;
					flex-direction: column;
					.record_item{
						width: 100%;
						color: #fff;
						display: flex;
						align-items: center;
						justify-content: space-between;
						margin: 5px 0;
					}
				}
			}
		}
		.guide{
			height: 259.49px;
			padding: 27px 30px;
			box-sizing: border-box;
			.image_container{
				display: flex;
				align-items: center;
				justify-content: space-around;
				margin-top: 40px;
				.image{
					width: 67px;
					height: 67px;
					>image{
						width: 100%;
						height: 100%;
					}
					.remark{
						color: #fff;
						text-align: center;
						white-space: nowrap;
						margin-top: 15px;
					}
				}
				.icons{
					width: 13px;
					height: 14px;
					>image{
						width: 100%;
						height: 100%;
					}
				}
			}
		}
	}
</style>
